package cn.yitun.chat.yitunservercommonlib.basebean.web;


import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * jwt 用户
 */
@Data
@NoArgsConstructor
public class WebsockJwtUserDto extends JwtUserDto{
    /**
     * 客户端ip
     */
    private String ip;
    /**
     * 客户端端口
     */
    private int port;

    /**
     * 群组id
     */
    private Long groupId;

    public WebsockJwtUserDto(Long userId) {
        this.setUserId(userId);
    }
    public WebsockJwtUserDto(Long groupId , Long userId) {
        this.setUserId(userId);
        this.groupId = groupId;
    }

    public WebsockJwtUserDto(Long userId, String username, String nickName, String userScope , long expireTime, String token, String ip) {
        this.setUserId(userId);
        this.setUserScope(userScope);
        this.setUsername(username);
        this.setNickName(nickName);
        this.setExpireTime(expireTime);
        this.setToken(token);
        this.ip = ip;
    }

}